Skip to content

FIX multi-config output dir for SofaRuntime and SofaTypes test data - #657

Open
alxbilger wants to merge 1 commit into
sofa-framework:masterfrom
alxbilger:multiconfig
Open

alxbilger wants to merge 1 commit into
sofa-framework:masterfrom
alxbilger:multiconfig

Conversation

@alxbilger

Copy link
Copy Markdown
Contributor

Fix Python test discovery for SofaRuntime and SofaTypes with multi-config generators

With a multi-config generator such as Visual Studio, test executables are placed in bin//. However, Bindings.SofaRuntime.Tests and Bindings.SofaTypes.Tests always copied their Python test files to bin/.d/. At runtime, the tests look for those files next to the executable, so they found nothing:

  • Bindings.SofaRuntime.Tests failed with Parameterized test suite Sofa is defined via TEST_P, but never instantiated.
  • Bindings.SofaTypes.Tests passed with 0 tests, so it silently tested nothing.

Change: both CMakeLists.txt files now use the same GENERATOR_IS_MULTI_CONFIG pattern as Bindings.Sofa.Tests and Bindings.Modules.Tests: with a multi-config generator, the Python files are copied into each configuration's output directory. Single-config builds (Ninja, Makefiles) go through the original code, unchanged.

🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant